{% extends "publisher/_publisher_layout.html" %}

{% block meta_title %}
Snapcraft - Register name dispute
{% endblock %}

{% block content %}
<div class="p-strip">
  <div class="u-fixed-width">
    <h1 class="p-heading--four"><a href="/snaps">&lsaquo; My snaps</a></h1>
    <h1 class="p-heading--two">Request reserved name <strong>{{snap_name}}</strong></h1>
    {% if errors %}
    {% for err in errors %}
    <div class="p-notification--negative">
      <p class="p-notification__response">
        <span class="p-notification__status">{{err.message}}</span>
      </p>
    </div>
    {% endfor %}
    {% endif %}
  </div>
  <form class="p-form p-form--stacked" action="/register-name-dispute" method="POST">
    <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
    <div class="p-form__group row">
      <div class="col-2">
        <label class="p-form__label">Store</label>
      </div>
      <div class="col-6">
        <div class="p-form__control u-clearfix">
          <span>Global</span>
        </div>
      </div>
    </div>
    <div class="p-form__group row">
      <div class="col-2">
        <label for="snap-name" class="p-form__label">Snap name</label>
      </div>
      <div class="col-6">
        <div class="p-form__control u-clearfix">
          <span><strong>{{snap_name}}</strong></span>
          <input hidden="text" id="snap-name" name="snap-name" value="{{snap_name}}"/>
        </div>
      </div>
    </div>
    <div class="p-form__group row">
      <div class="col-2">
        <label for="claim-comment" class="p-form__label">Comment</label>
      </div>
      <div class="col-6">
        <div class="p-form__control u-clearfix">
          <textarea id="claim-comment" name="claim-comment"></textarea>
          <p class="p-form-help-text">
            Why you have rights to claim this name
          </p>
        </div>
      </div>
    </div>
    <div class="u-fixed-width">
      <p>Are you sure you want to request reserved name {{snap_name}} in the Global store?</p>
    </div>
    <div class="u-fixed-width">
      <hr />
    </div>
    <div class="u-fixed-width u-clearfix">
      <button type="submit" class="p-button--positive u-float-right">Yes, I am sure</button>
      <a href="/register-snap" class="p-button--neutral u-float-right">Register a new name</a>
    </div>
  </form>
</div>
{% endblock %}
